import request from '@/utils/request';

export async function getPrintDesignItemByPage(params: any) {
  return request('/api/service/getPrintDesignItemByPage', {
    method: 'POST',
    data: params,
  });
}

export async function addPrintDesignItem(params: any) {
  return request('/api/service/addPrintDesignItem', {
    method: 'POST',
    data: params,
  });
}

export async function updatePrintDesignItem(params: any) {
  return request('/api/service/updatePrintDesignItem', {
    method: 'POST',
    data: params,
  });
}

export async function delPrintDesignItem(params: any) {
  return request('/api/service/delPrintDesignItem', {
    method: 'POST',
    data: params,
  });
}

export async function getDesignFileDetailById(params: any) {
  return request('/api/service/getDesignFileDetailById', {
    method: 'POST',
    data: params,
  });
}

export async function exportPrintDesignItem(params: any) {
  return request('/api/service/exportPrintDesignItem', {
    method: 'POST',
    data: params,
    responseType: 'blob',
  });
}
export default {
  getPrintDesignItemByPage,
  addPrintDesignItem,
  updatePrintDesignItem,
  delPrintDesignItem,
  exportPrintDesignItem,
  getDesignFileDetailById,
};
